home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
12511500
/
var1287.dms
/
var1287.adf
/
snap.AMOS
/
snap.amosSourceCode
Wrap
AMOS Source Code
|
1989-08-11
|
4KB
|
139 lines
Screen Open 0,320,256,32,Lowres : Double Buffer : Curs Off : Cls 0 : Paper 0 : Pen 5 : Flash Off : Hide
Rem Andy Paul,22 CEYLON PLACE,EASTBOURNE,EAST SUSSEX.
Rem Use this program if you like,but please give any credit where it's due
Rem fanks very much....
Rem load the talking bit ready for the computer to say snap
Set Talk ,,,
SNAP
Rem its only procedured because it looks nice and neat,,,until you open it
Procedure SNAP
Rem load the sprites
Load "bobs/snap.abk" : Get Sprite Palette
Rem give instructions_______"no....you don't say",well sandra,you said rem
'the programs well.....
Centre "SNAP by A.paul using AMOS..."
Print ""
Print ""
Pen 6
Print "INSTRUCTIONS---"
Pen 9
Print ""
Print ""
Print " Every thing is controlled by the"
Print " joystick."
Print ""
Pen 10
Print " Push up to twist your card...."
Print ""
Print " Press FIRE to call the words---"
Print " SNAP"
Print ""
Pen 12
Print " The arrow at the top of the screen"
Print " tells you who's go it is.You are on"
Print " the left side."
Print ""
Print ""
Print ""
Pen 15 : Centre "PRESS ANY KEY....."
Clear Key : Wait Key : Cls 0
Home
Centre "SNAP by A.Paul using AMOS..."
Rem the next 3 lines draw a simple star field effect
For A=1 To 50
Plot Rnd(320),Rnd(256),Rnd(6)
Next A
Rem Place all the cards and bobs in relevant places
Rem Image 9 is blank
Bob 1,10,50,7
Bob 2,250,50,7
Bob 3,110,40,9
Bob 4,140,75,9
Bob 5,25,20,9
Bob 6,265,20,9
MAIN:
Locate 0,25
Print " YOU HAVE I HAVE"
Print ""
Print ""
Print ""
Print " CARDS CARDS"
Locate 2,27 : Print "30 "
Locate 32,27 : Print "30 "
Rem Y=players cards,M=computers cards,C=amount of cards in the middle
Y=30 : M=30 : C=0
Do
Rem bob 5+6 are the arrows
Bob 6,,,9 : Bob 5,,,8
Rem if Y or M=0 then that person has lost,so check to see if anyone is 0
If Y=0 Then Gosub MWUN
If M=0 Then Gosub YWUN
Rem wait for user to push joystick up
Repeat
Until Jup(1)
Shoot
Rem goto the twist bit
Gosub TWIST
Rem if Image bob 3 is the same as 4 then we've got a snap
If I Bob(3)=I Bob(4) Then Gosub SNAP
Bob 5,,,9 : Bob 6,,,8
If Y=0 Then Gosub MWUN
If M=0 Then Gosub YWUN
Rem wait for a random amount up to 200,it gives a more realistic feel
Wait Rnd(200)+1
Shoot : Bob 4,,,Rnd(6) : Dec M : Locate 32,27 : Print M;" " : Inc C
If I Bob(4)=0 Then Bob 4,,,3
If I Bob(3)=I Bob(4) Then Gosub SNAP
Loop
TWIST:
Bob 3,,,Rnd(6)
Rem using Rnd()means the number could be 0,we dont want nothing showing so..
If I Bob(3)=0 Then Bob 3,,,3
Dec Y : Inc C
Locate 2,27 : Print Y;" "
Return
Rem This sub gives the player a chance to call snap
SNAP:
T=0
Rem if you want less chance of beating the computer make 2000 lower
Rem Below a 1000 you've no chance
Repeat
Inc T
If T=1800 Then Say "snap ." : Say "har har." : M=M+C : C=0 : Locate 32,27 : Print M;" " : Bob 3,,,9 : Bob 4,,,9 : Return
Until Fire(1)
Rem This makes a choice of four random sayings
WHATSAID=Rnd(3)
If WHATSAID=0 Then Goto 30
If WHATSAID=1 Then Goto 31
If WHATSAID=2 Then Goto 32
If WHATSAID=3 Then Goto 33
30 Say "thats not fair." : Goto 34
31 Say " your a cheat." : Goto 34
32 Say "next wuns mine." : Goto 34
33 Say " huh."
34
Rem Y+C is now the users total,and C becomes 0 (No cards in middle)
Y=Y+C : C=0 : Locate 2,27 : Print Y;" "
Bob 3,,,9 : Bob 4,,,9
Return
YWUN:
Bob 5,,,9 : Bob 6,,,9
Say "you wun."
Say "would you like another go."
Say "move joystick up for yes."
Say "move joystick down for no."
Do
If Jup(1) Then Gosub MAIN
If Jdown(1) Then Show : Run "menu.amos"
Loop
MWUN:
Bob 5,,,9 : Bob 6,,,9
Say "yip pee i wun."
Say "would you like another go."
Say "move joystick up for yes."
Say "move joystick down for no."
Do
If Jup(1) Then Gosub MAIN
If Jdown(1) Then Show : Run "menu.amos"
Loop
End Proc